:global(:root) {
  --layout-grid-header-height: 32px;
  --layout-grid-margin: 32px;
  --ag-row-border: 1px solid #c41717;
}

:global(body) {
  margin: 0;
}

@media screen and (max-width: 720px) {
  :global(div.ag-theme-quartz),
  :global(div.ag-theme-quartz-dark) {
    --ag-font-size: 12px;
    --ag-grid-size: 6px;
  }
}

:global(.ag-theme-quartz .ag-body-viewport),
:global(.ag-theme-quartz-dark .ag-body-viewport) {
  padding-top: 8px;
}

:global(.ag-theme-quartz .ag-row-group .ag-icon),
:global(.ag-theme-quartz-dark .ag-row-group .ag-icon) {
  opacity: 0.5;
}

:global(.ag-theme-quartz .ag-row),
:global(.ag-theme-quartz-dark .ag-row) {
  border-bottom: none;
}

:global(.ag-theme-quartz .ag-row:not(.ag-row-level-1)),
:global(.ag-theme-quartz-dark .ag-row:not(.ag-row-level-1)) {
  border-radius: 8px;
  overflow: hidden;
}

/* Required to transition background color for row hover */
:global(.ag-theme-quartz .ag-row:not(.ag-row-level-1)::before),
:global(.ag-theme-quartz-dark .ag-row:not(.ag-row-level-1)::before) {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  transition: background-color 0.33s ease-in-out;
}

:global(.ag-theme-quartz .ag-cell-expandable),
:global(.ag-theme-quartz-dark .ag-cell-expandable) {
  display: flex;
  justify-content: center;
  align-items: center;
}

:global(.ag-theme-quartz .ag-cell),
:global(.ag-theme-quartz-dark .ag-cell) {
  display: flex;
  align-items: center;
}

:global(.ag-theme-quartz .ag-cell:first-child),
:global(.ag-theme-quartz-dark .ag-cell:first-child) {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

:global(.ag-theme-quartz .ag-cell:last-child),
:global(.ag-theme-quartz-dark .ag-cell:last-child) {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

:global(.ag-theme-quartz .ag-right-aligned-cell),
:global(.ag-theme-quartz-dark .ag-right-aligned-cell) {
  justify-content: flex-end;
}

:global(.ag-theme-quartz-dark .ag-header) {
  background-color: #28313e;
  border-radius: 8px;
  border: none;
}

:global(.ag-theme-quartz .ag-header) {
  background-color: #f9fafb;
  color: #39485d;
  border-radius: 8px;
  border: 1px solid #eff0f1;
}

:global(.ag-theme-quartz .ag-header-cell-text),
:global(.ag-theme-quart-dark .ag-header-cell-text) {
  color: #1f383c;
  display: flex;
  align-items: center;
}

:global(.ag-theme-quartz-dark .ag-header-cell-text) {
  color: #c9d0da;
}

:global(.ag-theme-quartz .ag-root-wrapper),
:global(.ag-theme-quartz-dark .ag-root-wrapper) {
  border: none;
}

:global(.ag-theme-quartz .ag-full-width-container .ag-row),
:global(.ag-theme-quartz-dark .ag-full-width-container .ag-row),
:global(.ag-theme-quartz .ag-full-width-container .ag-details-row),
:global(.ag-theme-quartz-dark .ag-full-width-container .ag-details-row) {
  background-color: transparent;
}

:global(.ag-theme-quartz .ag-details-row),
:global(.ag-theme-quartz-dark .ag-details-row) {
  padding: 16px;
}

:global(.ag-theme-quartz .ag-paging-panel) {
  height: 40px;
}

:global(.ag-theme-quartz .ag-paging-panel > span:last-child) {
  margin-right: 0;
}

:global(.ag-center-cols-viewport) {
  min-height: unset !important;
}

.grid {
  --ag-header-background-color: transparent !important;

  height: calc(
    100vh - var(--layout-grid-header-height) - 62px - var(--layout-grid-margin)
  );
  margin: 0 var(--layout-grid-margin) var(--layout-grid-margin);
}

.exampleHeader {
  display: flex;
  justify-content: space-between;
  padding-bottom: 16px;
  padding-top: 8px;
  margin: var(--layout-grid-margin) var(--layout-grid-margin) 0;
}

.exampleHeader {
  padding-bottom: 16px;
  padding-top: 8px;
}

.exampleHeader span {
  margin-right: 12px;
  font-size: 14px;
}

.inputWrapper {
  position: relative;
  display: flex;
  align-items: center;
  overflow: visible;
}

.inputWrapper svg {
  position: absolute;
  left: 8px;
  pointer-events: none;
}

.inputWrapper input {
  font-size: 14px;
  padding: 0.375em 0.75em 0.375em 2.4em;
  line-height: 1.4;
  border-radius: 6px;
  border: 1px solid var(--color-input-border, #d0d5dd);
  background-color: transparent;
  outline: none;
}

.price {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.price span {
  line-height: 100%;
}

.increase {
  opacity: 0.7;
}

.tabs {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  padding: 4px;
  background-color: var(--color-bg-secondary, #f9fafb);
  border: 1px solid var(--color-border-secondary, #eff0f1);
  color: #39485d;
  border-radius: 8px;
}

.tabButton {
  appearance: none;
  display: inline-block;
  padding: 0.375em 1em 0.5em;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  background-color: var(--color-bg-secondary, #f9fafb);
  color: var(--color-text-secondary, #39485d);
  cursor: pointer;
  box-shadow: none;
  transition: background 0.3s, color 0.3s;
}

.tabButton:hover {
  background: #7c7c7c23;
  color: rgba(37, 37, 37, 0.6);
}

.tabButton.active {
  background: #fff;
  color: #000;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

:global(.header-status .ag-header-cell-text:before) {
  content: url("/example/inventory/icons/product.svg");
  padding-right: 8px;
  opacity: 0.3;
}

:global(.header-price .ag-header-cell-text:before) {
  content: url("/example/inventory/icons/price.svg");
  padding-right: 8px;
  opacity: 0.3;
}

:global(.header-sku .ag-header-cell-text:before) {
  content: url("/example/inventory/icons/sku.svg");
  padding-right: 8px;
  opacity: 0.3;
}

:global(.header-inventory .ag-header-cell-text:before) {
  content: url("/example/inventory/icons/inventory.svg");
  padding-right: 8px;
  opacity: 0.3;
}

:global(.header-product .ag-header-cell-text:before) {
  content: url("/example/inventory/icons/product.svg");
  padding-right: 8px;
  opacity: 0.3;
}

:global(.header-status .ag-header-cell-text:before) {
  content: url("/example/inventory/icons/status.svg");
  padding-right: 8px;
  opacity: 0.3;
}

:global(.header-calendar .ag-header-cell-text:before) {
  content: url("/example/inventory/icons/calendar.svg");
  padding-right: 8px;
  opacity: 0.3;
}

:global(.header-percentage .ag-header-cell-text:before) {
  content: url("/example/inventory/icons/percentage.svg");
  padding-right: 8px;
  opacity: 0.3;
}

:global(.ag-theme-quartz-dark .ag-header-cell-text:before) {
  filter: invert(1);
}

.stockText {
  opacity: 0.7;
}

.variantsText {
  opacity: 0.7;
}
